package com.alibaba.citrus.cr.mn.order.center.facade.function.dataobject;

import com.epoch.app.crb2btradecenter.domain.order.model.Order;
import com.epoch.app.crb2btradecenter.domain.orderline.model.OrderLine;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author zhangxiaorui
 * @ClassName AtomOrderDO
 * @description: TODO
 * @date 2023/04/25 20:09
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AtomOrderDO {

    private Order order;

    private List<OrderLine> orderLines;

    private boolean autoSubmit;

    private AtomOrderDO factoryBusinessOrderDO;

    public String getFromSys() {
        return order.getFromSys();
    }

    public String getSourceOrderNo() {
        return order.getSourceOrderNo();
    }

    public String getSalesOrderNo() {
        return order.getOrderBizId();
    }

    public Long getSalesOrderId() {
        return order.getId();
    }

    public String getReqNo() {
        return order.getReqNo();
    }

    public String getProductGroupCode() {
        return order.getProductGroupCode();
    }

    public String getUniqueKey() {
        return order.getFromSys() + "_" + getSourceOrderNo();
    }

    public String getRelationNo() {
        return order.getRelationNo();
    }
}
